Skip to content

Comments

Fixes #392: 3D time-series zonal stats via Dataset#856

Merged
brendancol merged 1 commit intomasterfrom
fixes-392-3D-zonal-stats
Feb 20, 2026
Merged

Fixes #392: 3D time-series zonal stats via Dataset#856
brendancol merged 1 commit intomasterfrom
fixes-392-3D-zonal-stats

Conversation

@brendancol
Copy link
Contributor

Summary

  • Documents the pattern of converting a 3D time-series DataArray to a Dataset via .to_dataset(dim='time') and passing it to stats() to get per-timestep zonal statistics
  • Updates stats() docstring with a 3D time-series example and a note in the values parameter description
  • Adds 3 new tests (4 parametrized cases) covering default stats (numpy + dask), zone filtering, and custom stats functions

Test plan

  • pytest xrspatial/tests/test_zonal.py -k 3d_timeseries — all 4 new tests pass
  • pytest xrspatial/tests/test_zonal.py — full suite (46 tests) passes with no regressions

Add docstring example and tests showing how to compute zonal statistics
on 3D time-series DataArrays by converting to a Dataset with
`.to_dataset(dim='time')` and passing to `stats()`.
@brendancol brendancol merged commit 0ef76c8 into master Feb 20, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant